<!DOCTYPE html>
<html lang="en">
<head>
	<title>基于HTML5的仿百度UI的图片上传</title>
	<meta charset="utf-8" />
	<!-- common css-->

	<link rel="stylesheet" type="text/css" href="BUpload/css/upload.css" />
</head>
<body style="background: #424f63">

<div style="padding:100px;">
	<button id="open">弹出窗口</button>
	<button id="upload-btn" style="padding: 10px 20px;">上传图片</button>
	<div id="image-box">

	</div>
</div>

<script src="BUpload/jquery.min.js"></script>
<script src="BUpload/BUpload.js"></script>
<script>

	$("#upload-btn").on("click", function() {

		new BUpload({
			upload_url : "upload.php",
			list_url : "image_list.php",	//图片列表数据获取url
			search_url : "image_search.php",	//图片搜索页面url
			max_filesize : 1024,
			max_filenum : 10,
			callback : function(data) {
				$.each(data, function(idx, item) {
					$("#image-box").append('<img src="'+item+'" width="200" />');
				});
				console.log(data);
			}
		});

	});

	$("#open").on("click", function() {
		window.open('http://www.baidu.com', 'newwindow', 'fullscreen=1,scrollbars,resizable=yes')
	});
</script>

</body>
</html>
